//
//  UUWalletApplicationSuccessVC.m
//  UUCharterSupplier
//
//  Created by ZhangAo on 02/03/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import "UUWalletApplicationSuccessVC.h"

@interface UUWalletApplicationSuccessVC ()

@property (nonatomic, strong) UIImageView *imageView;

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subtitleLabel;

@property (nonatomic, strong) UIButton *actionButton;

@end

@implementation UUWalletApplicationSuccessVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"提现申请成功";
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"WalletApplicationSuccess"]];
    [self.view addSubview:self.imageView];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.equalTo(self.mas_topLayoutGuideBottom).offset(81);
    }];
    
    self.titleLabel = [UILabel new];
    self.titleLabel.text = @"提现申请已提交";
    self.titleLabel.textColor = COMMON_TEXT_BLACK_COLOR;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = [UIFont systemFontOfSize:16];
    [self.view addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.imageView.mas_bottom).offset(33);
        make.left.right.mas_equalTo(0);
        make.height.mas_equalTo(23);
    }];
    
    self.subtitleLabel = [UILabel new];
    self.subtitleLabel.text = @"等待客服人员审核，预计24小时内审核完成";
    self.subtitleLabel.textColor = COMMON_TEXT_LIGHT_COLOR;
    self.subtitleLabel.textAlignment = NSTextAlignmentCenter;
    self.subtitleLabel.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:self.subtitleLabel];
    [self.subtitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.titleLabel.mas_bottom).offset(10);
        make.left.right.mas_equalTo(0);
        make.height.mas_equalTo(20);
    }];
    
    self.actionButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.actionButton.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.actionButton setTitle:@"知道了" forState:UIControlStateNormal];
    [self.actionButton setTitleColor:COMMON_TEXT_DARK_COLOR forState:UIControlStateNormal];
    [self.actionButton addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];
    self.actionButton.layer.borderColor = COMMON_TEXT_DARK_COLOR.CGColor;
    self.actionButton.layer.borderWidth = 1;
    self.actionButton.layer.cornerRadius = 2;
    [self.view addSubview:self.actionButton];
    [self.actionButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.subtitleLabel.mas_bottom).offset(40);
        make.width.mas_equalTo(95);
        make.height.mas_equalTo(35);
        make.centerX.mas_equalTo(0);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)goBack {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
